
function string.split(str, p)
	local rt = {}
	string.gsub(str, '[^' .. p .. ']+', function (w) table.insert(rt, w) end)
	return rt
end

